package com.atguigu.myrule;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import com.netflix.loadbalancer.RoundRobinRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

//这个自定义配置类不能放在@ComponentScan所扫描的当前包及其子包下面
@Configuration
public class MySelfRule {

    //ctrl + h 查看所有接口的实现类
    @Bean
    public IRule getRule(){
        return new RandomRule();
    }
}
